<header class="topwrap wrapper100percent">

    <div class="container100percent">

        <ul id="bxslider">
        	<?php if(isset($mSlideAlbum[0])):?>
        	<?php foreach ($mSlideAlbum[0]->getRelated('image') as $index => $image):?>
        	<li>
                <img src="<?php echo $image['path'];?>" title="The long and winding road" alt="picture"/>
            </li>
        	<?php endforeach;?>
        	<?php else:?>
            <li>
                <img src="<?php echo Yii::app()->request->baseUrl; ?>/images/front/topimage1.jpg" title="The long and winding road" alt="picture"/>
            </li>
            <li>
                <img src="<?php echo Yii::app()->request->baseUrl; ?>/images/front/topimage1.jpg" title="Funky roots" alt="picture"/>
            </li>
            <?php endif;?>
        </ul>

        <h3 class="subtitle2">This is HTML5 template for Tattoo and Piercing studio </h3> 

        <a class="toplink" href="#section1"><i class="icon-chevron-down"></i></a>
        
    </div>


</header> 


<div id="section1" class="sectionwrapper"></div> 

<section class="wrapper100percent onesection">

    <div class="mainheadlinewrapper">
        <div class="mainheadline">
            <h4>About</h4>
        </div>
    </div>


    <!-- About's content -->
    <?php $aboutContent = isset($mAbout[0]['description_one']) ? $mAbout[0]['description_one'] : ''; ?>
    <?php echo CHtml::decode(str_replace('<br />', '', $aboutContent)); ?>


</section> <!--/onesection end--> 



<div id="parallax2">
    <section class="bxwrap">
        <div class="testimonialsquote"></div>
        <ul id="bxslider1">
            <li> 
                <div class="textbx">
                    <p class="subtitle1">"This is testimonial text three, lorem ipsum dolor."
                    </p> 
                    <br> 
                    <a href="#" class="subtitle2">John Doe3
                    </a> 
                </div> <!--/textbx end--> 
            </li>
            <li> 
                <div class="textbx">
                    <p class="subtitle1">"This is testimonial text two, lorem ipsum dolor."
                    </p> 
                    <br> 
                    <a href="#" class="subtitle2">John Doe2
                    </a> 
                </div> <!--/textbx end--> 
            </li>
            <li> 
                <div class="textbx">
                    <p class="subtitle1">"This is testimonial text one, lorem ipsum dolor."
                    </p> 
                    <br> 
                    <a href="#" class="subtitle2">John Doe1
                    </a> 
                </div> <!--/textbx end--> 
            </li>
        </ul>
    </section>
</div><!--/parallax2 end--> 



<div id="section2" class="sectionwrapper"></div> 

<style>
    <!--
    #container .gallery-text-down{
        display: block; 
        width: 280px; 
        height: 280px;
    }
    #container ul.verticleslide li {
        display:  inline-block !important;
        margin-left: -10px !important;
        margin-top: -62px !important;
    }
    #container ul.fadeslide li {
        display: inline-block !important;
        margin-left: -134px !important;
        margin-top: -62px !important;
    }
    #container .mask {
        z-index: 9999 !important;
    }
    -->
</style>

<!-- Add fancyBox main JS and CSS files -->
<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/fancyBox/source/jquery.fancybox.js?v=2.1.5"></script>
<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/fancyBox/source/jquery.fancybox.css?v=2.1.5" media="screen" />
	
<section class="wrapper100percent onesection">

    <div class="mainheadlinewrapper">
        <div class="mainheadline">
            <h4>Gallery</h4>
        </div>
    </div>


    <div class="container isotopecontainer">
        <div class="row">
            <div class="col-lg-12 marginbottomisotope">

                <div id="options" class="clearfix">

                    <ul id="filters" class="option-set clearfix"
                        data-option-key="filter">
                        <li><a href="#filter" data-option-value="*" class="selected">all</a></li>
                        <?php
                        foreach ($mGallery as $g) :
                            $filter = ".gallery" . $g['id'];
                            if (strtolower($g->name) != 'slide'):
                            ?>
                            <li><a href="#filter" data-option-value="<?= $filter; ?>"><?= $g->name ?></a></li>
                        <?php endif;
                      	endforeach; ?>


                    </ul>
                    <!--
                    Gallery image
                    -->

                    <div id="container" class="photos clearfix">

                        <?php
                        foreach ($mAlbum as $index => $a) :
                            $filter = "gallery" . $a->gallery->id;
                     	?>
                            <div class="photo <?= $filter; ?>" >

                                <div class="gallery-item-mask">
                                    <div class="gallery-text-down view view-first">
										<ul class="gallery <?php echo ($index%2)?'fadeslide':'verticleslide';?>"  id="bxslider-<?php echo $a->id;?>">
										
                                            <?php foreach ($a->image as $k => $i): ?>
                                                <li><a class="fancybox"  href="<?= $i->path; ?>" data-fancybox-group="gallery" title="<?= $i->description; ?>">
                                            		<img src="<?= ''.$i->path; ?>"  alt="" />
                                            	</a></li>
                                         	<?php endforeach; ?>

                                        </ul>
										
										<?php ?>
                                        <div class="mask">
                                            <a onclick="showfancybox(<?php echo $a->id;?>); return false;" class="group4" href="javascript:;" title="">
                                                <h3>View Album</h3> 
                                            </a>
                                        </div>
										<?php ?>
                                    </div>
                                </div>

                            </div>
                            
                    	<?php
                        endforeach;
                        ?>

                    </div>

                </div>

            </div>
            
        </div>

    </div>

</section> <!--/section1 end-->
<script type="text/javascript" charset="utf-8">
function showfancybox(albumid) {
	$('#bxslider-'+albumid+' .fancybox').fancybox().trigger('click');
}
</script>
			
<!--/parallax3 begin--> 
<div id="parallax3">
    <div class="container">
        <div class="row">
            <div class="col-lg-12">
                <p class="parallaxtext">Typi non usus legentis in iis qui facit eorum claritatem. Typi non usus legentis in iis legentis.
                </p> 
            </div></div>
    </div>
</div><!--/parallax3 end--> 

<!-- Begin of Blog/News -->
<div id="section3" class="sectionwrapper"></div> 

<section class="wrapper100percent onesection">

    <div class="mainheadlinewrapper">
        <div class="mainheadline">
            <h4>Blog/News</h4>
        </div>
    </div>


    <div class="container bloghomepage">
        <div class="row">

            <!-- Begin News -->

            <div class="comments">
                <div class="row">
                    <?php foreach ($mNews as $index => $content): ?>
                        <?php $image = $content->getRelated('image'); ?>
                        <?php $url = !empty($image) ? $image[0]['path'] : Yii::app()->baseUrl . 'images/no-image.png'; ?>
                        <div class="col-lg-2">
                            <!--/one comment-->
                            <div class="avatarwrapper">
                                <div class="avatar">
                                    <a class="iframe group4" href="<?php echo Yii::app()->baseUrl . 'index.php/news/detail/' . $content['id']; ?>" title="">
                                        <img alt="avatar" src="<?php echo Yii::app()->baseUrl . $url; ?>" width="150" height="150">
                                    </a>
                                </div>
                            </div>
                        </div>

                        <div class=" col-lg-10">
                            <div class="commenttext">
                                <div class="bloghomepagetextborder">
                                    <a class="iframe group4" href="<?php echo Yii::app()->baseUrl . 'index.php/news/detail/' . $content['id']; ?>" title="">
                                        <h3><?php echo ucfirst(trim($content['name'])); ?></h3>
                                    </a>
                                    <p class="date"><?php echo date("d/m/Y", strtotime($content['updated_at'])); ?></p>
                                    <p>
                                        <?php echo trim($content['description']); ?>
                                    </p>
                                </div>
                            </div>
                        </div>
                        <!--/one comment end-->

                    <?php endforeach; ?>

                </div>
                <!--/row end-->

            </div>
            <!--/comments end-->

            <!-- End News -->

        </div> <!--/row end--> 

        <!-- 
                <div class="row bloghomepagebuttonwrapper">
                    <div class="bloghomepagebutton">
        
                        <a href="blog_index.html">Visit our blog
                        </a> 
        
                    </div>
                </div>
        -->


    </div>  <!--/container end--> 

</section> <!--/section1 end--> 

<!-- End of Blog/News -->

<!--/parallax3 begin--> 
<div id="parallax3">
    <div class="container">
        <div class="row">
            <div class="col-lg-12">
                <p class="parallaxtext">Typi non usus legentis in iis qui facit eorum claritatem. Typi non usus legentis in iis legentis.
                </p> 
            </div></div>
    </div>
</div><!--/parallax3 end--> 

<!-- Begin of Video -->

<div id="section4" class="sectionwrapper"></div> 

<section class="wrapper100percent onesection">

    <div class="mainheadlinewrapper">
        <div class="mainheadline">
            <h4>Video</h4>
        </div>
    </div>

    <div class="container bloghomepage">
        <div class="row">

            <!-- Begin Video -->

            <div class="comments">
                <div class="row">
                    <?php foreach ($mVideo as $index => $content): ?>
                        <?php $url = Common::getYouTubeId($content['url']); ?>
                        <?php $url = ($url != null) ? $url : Yii::app()->baseUrl . 'images/no-image.png'; ?>
                        <div class="col-lg-2">
                            <!--/one comment-->
                            <div class="avatarwrapper">
                                <div class="avatar">
                                    <a class="iframe group4" href="<?php echo Yii::app()->baseUrl . 'index.php/video/detail/' . $content['id']; ?>" title="">
                                        <img alt="avatar" src="http://img.youtube.com/vi/<?php echo $url; ?>/hqdefault.jpg" width="150" height="150">
                                    </a>
                                </div>
                            </div>
                        </div>

                        <div class=" col-lg-10">
                            <div class="commenttext">
                                <div class="bloghomepagetextborder">
                                    <a class="iframe group4" href="<?php echo Yii::app()->baseUrl . 'index.php/video/detail/' . $content['id']; ?>" title="">
                                        <h3><?php echo ucfirst(trim($content['name'])); ?></h3>
                                    </a>
                                    <p class="date"><?php echo date("d/m/Y", strtotime($content['updated_at'])); ?></p>
                                    <p>
                                        <?php echo trim($content['description']); ?>
                                    </p>
                                </div>
                            </div>
                        </div>
                        <!--/one comment end-->

                    <?php endforeach; ?>

                </div>
                <!--/row end-->

            </div>
            <!--/comments end-->

            <!-- End Video -->


        </div> <!--/row end--> 

        <!-- 
                <div class="row bloghomepagebuttonwrapper">
                    <div class="bloghomepagebutton">
        
                        <a href="blog_index.html">Visit our blog
                        </a> 
        
                    </div>
                </div>
        -->


    </div>  <!--/container end--> 

</section> <!--/section1 end-->

<!-- End of Video -->

<div id="parallax4">
    <div class="container">
        <div class="row">
            <div class="col-lg-12 testimonials">
                <p class="parallaxtext">Typi non usus legentis in iis qui facit eorum claritatem. Typi non usus legentis in iis legentis.
                </p> 
            </div></div>
    </div>
</div><!--/parallax4 end--> 

<div id="section5" class="sectionwrapper"></div> 
<section class="map wrapper100percent">
    <!-- 
<p class="maptext">Address: 222 West Madison Street Phoneix, AZ 85003, United States</p> 

<p class="maptext1">Phone: +99 888 444 222</p> 

<iframe src="https://maps.google.com/maps?f=q&amp;
                    source=s_q&amp;hl=en&amp;geocode=&amp;
                    q=Qton+Los+angeles,+West+39th+Street,+New+York,+NY,+United+States&amp;
                    aq=3&amp;oq=los+angeles&amp;sll=40.714353,-74.005973&amp;
                    sspn=0.852506,1.783905&amp;ie=UTF8&amp;hq=Qton+Los+angeles,&amp;
                    hnear=W+39th+St,+New+York&amp;t=m&amp;z=16&amp;iwloc=A&amp;output=embed">
</iframe>
<br />
<small>
    <a href="https://maps.google.com/maps?f=q&amp;
                    source=embed&amp;hl=en&amp;geocode=&amp;
                    q=Qton+Los+angeles,+West+39th+Street,+New+York,+NY,+United+States&amp;
                    aq=3&amp;oq=los+angeles&amp;sll=40.714353,-74.005973&amp;
                    sspn=0.852506,1.783905&amp;ie=UTF8&amp;hq=Qton+Los+angeles,&amp;
                    hnear=W+39th+St,+New+York&amp;t=m&amp;z=16&amp;iwloc=A" 
                    style="color:#0000FF;text-align:left">
    </a>
</small>
    -->
    <!--
    <iframe width="300" height="170" frameborder="0" scrolling="no" 
                marginheight="0" marginwidth="0" 
                src="https://maps.google.com/maps?q='+YOUR_LAT+','+YOUR_LON+'&hl=es;z=14&amp;output=embed">
    </iframe>
    <br />
    <small>
        <a href="https://maps.google.com/maps?q='+data.lat+','+data.lon+'&hl=es;z=14&amp;output=embed" 
                style="color:#0000FF;text-align:left" target="_blank">
        See map bigger
        </a>
    </small> 
    -->
    <p class="maptext">Address: 1 LÃª Lá»£i, phÆ°á»�ng 4, Quáº­n 1, Há»“ ChÃ­ Minh, Viet Nam</p> 
    <p class="maptext1">Phone: +84 222 444 666</p> 
    <iframe src="http://maps.google.com/?q=1 LÃª Lá»£i, phÆ°á»�ng 4, quáº­n 1, Há»“ ChÃ­ Minh, Vietnam&amp;output=embed">
    </iframe>
    <br />
    <small>
        <a href="http://maps.google.com/?q=1 LÃª Lá»£i, phÆ°á»�ng 4, quáº­n 1, Há»“ ChÃ­ Minh, Vietnam&amp;output=embed" 
           style="color:#0000FF;text-align:left">
        </a>
    </small>
</section>



<section class="wrapper100percent onesection">

    <div class="mainheadlinewrapper">
        <div class="mainheadline">
            <h4>Contact</h4>
        </div>
    </div>

    <div class="container">
        <div class="row">
            <div class="col-lg-12 contact">


                <!--/comment-form-->
                <div>
                    <!-- <form method="post" action="http://rayoflightthemes.com/htmltemplates/ink_tattoo_studio_html5_template/red/expander_portfolio/sendEmail.php"> -->
                    <form method="post" action="<?php echo $this->createUrl('/contact/mail'); ?>" onsubmit="return validateForm();">
                        <div>

                            <div id="main">
                                <div>


                                    <div class="inputwrapper1">
                                        <div class="contact1">
                                            <p><input type="text" placeholder="your name" name="name" id="name" 

                                                      class="commentfield" /></p> </div>

                                        <div class="contact2">
                                            <p> <input type="text" placeholder="your e-mail adress" name="email" id="email" 

                                                       class="commentfield" /></p> </div>

                                    </div>

                                    <div class="inputwrapper1">
                                        <p><textarea name="comments" placeholder="message" id="comments" 

                                                     rows="12" cols="5" class="textarea"></textarea></p>
                                    </div>



                                    <div class="buttoncontactwrapper">
                                        <p><input type="submit"  name="submit"  class="buttoncontact" id="submit" value="Send Message"/>
                                        </p></div>

                                    <ul id="response"></ul> </div></div>

                        </div>
                    </form> </div>
                <!--/comment-form-end--> 
            </div>
        </div>


        <div class="row">
            <div class="col-lg-6 centered bottomicons">   

                <!-- <a href="https://www.facebook.com/pages/Rayoflightthemes/408688349185439" class="facebookicon" title="Facebook"></a> -->
                <a href="https://www.facebook.com/" class="facebookicon" title="Facebook"></a>  
                <a href="http://twitter.com/" class="twittericon" title="Twitter"></a>  
                <a href="http://youtube.com/" class="youtubeicon" title="Youtube"></a>  
                <a href="http://pinterest.com/" class="pinteresticon" title="Pinterest"></a>  
                <a href="http://deviantart.com/" class="deviantarticon" title="Deviantart"></a>  
            </div>
        </div>


    </div>

</section>



